﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace B04_跑马灯
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        string text = "";
        private void timer1_Tick(object sender, EventArgs e)
        {
            Console.WriteLine("hello world");
            text = text.Substring(1) + text.Substring(0, 1);
            label2.Text = text;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            text = textBox1.Text;
            if (!timer1.Enabled)
                timer1.Start();
        }
    }
}
